const state = {
    scrollTop: 0,
	id:'',
	tab_list: [			
		{
				pagePath: "/pages/home/index",
				iconPath: "/static/tab_icon/home.png",
				selectedIconPath:  "/static/tab_icon/home_1.png",
				text: "首页"
			},
			{
				pagePath: "/pages/artistic/index",
				iconPath: "/static/tab_icon/artistic.png",
				selectedIconPath:  "/static/tab_icon/artistic_1.png",
				text: "艺品城"
			},
			{
				pagePath: "/pages/manual/index",
				iconPath: "/static/tab_icon/manual.png",
				selectedIconPath: "/static/tab_icon/manual_1.png",
				text: "手工集"
			},
			{
				pagePath: "/pages/my/index",
				iconPath: "/static/tab_icon/my.png",
				selectedIconPath: "/static/tab_icon/my_1.png",
				text: "我的"
			}
		]
};

const getters = {
    getScrollTop(state) {
        return state.scrollTop;
    },
}
const mutations = {
    mutSetScrollTop(state, data) {
        state.scrollTop = data;
    },
	mutsetgetid(state,data) {
	    state.id = data;
	}
};

const actions = {
    actionSetScrollTop(context, data) {
        context.commit('mutSetScrollTop', data);
    },
	actionSetgetid(context, data) {
		console.log(data,'sta')
	    context.commit('mutsetgetid', data);
	}
};

export default {
    namespaced: true,
    state,
    getters,
    mutations,
    actions
}